package com.yj.consumer.dynamicDataSource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleService {

    @Autowired
    RoleMapper roleMapper;

    @DataSourceChoose(DataSourceType.REMOTE_DB)
    public List<Role> findAll(){
        List<Role> list = roleMapper.findAll();
        return list;
    }

}
